<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文档的加载</title>
    <script type="text/javascript">
        window.onload = function (){
            alert('我是一个Button按钮')
        };
    </script>
</head>
<body>
<button id="btn">我是一个按钮</button>
</body>
</html>